home *** CD-ROM | disk | FTP | other *** search
- ASSEMBLE OPERANDS vs MASM OPERANDS
-
- Below is a partial listing of the syntax difference between ASSEMBLE and
- Microsoft's Macro Assembler. Although I don't have any refference material
- for the Macro Assembler to make a complete cross refference these are the
- instructions I see most often in magazine listings. I hope it helps.
-
- In each of the examples below "lable" is a lable for a memory location such
- as the start of a buffer or the data in a DB operand. Equate is a label for
- the EQU pseudo operand and represents either a 8 or 16 bit value. Val is
- any legal integer number.
-
- ASSEMBLE MASM description
- lable lable: All lables in ASSEMBLE are global.
- Use of a colon makes no difference.
-
- assume ss:lable Assume not supported.
-
- ds 10,' ' db 10 dup (' ') initialize 10 memory bytes to blanks.
-
- mov cl,[si] mov cl,byte ptr [si] move byte at address pointed to by
- SI into CL. ASSEMBLE determines
- byte operation from cl register.
-
- movb lable,23 mov lable,23 Word or byte expressed in opcode
- cmpw lable,equate cmp lable,equate when operand is a memory pointer
- movw [si],23 mov word ptr [si],23 and source is immediate data.
-
- cmpb [lable+val],23 cmp lable[val],23 Addressing byte at lable plus an
- offsetting value.
-
- mov al,lable+1[bx] mov al,lable[bx+1] Addressing byte at lable+1+BX.
- Registers in brackets must be in
- exact format given in ASSEMBLE
- documentation.
-
- repne repne scasb Repeat pre opcodes must be on a
- scasb seperate line.
-
- es Segment over rides must be on a
- mov ah,[bx] mov ah,es:[bx] seperate line
-
- shr AH shr AH,1 When the shift is one bit the shift
- shl AH,CL shl AH,CL value is understood. Shifts of more
- than one require the use of the CL
- register.
-
- jmps lable jmp short lable See discussion of jumps in DOC.
-
- jmpf lable jmp far label " " " "